package com.itljm.cxrMarket.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 商品评论表
 * @TableName reviews
 */
@TableName(value ="reviews")
@Data
public class Reviews implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer reviewId;
    private Integer productId;//商品id
    private Long userId;//用户id
    private Integer rating;//评分
    private String content;//评论内容
    private String imgUrls;//评论图片
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date reviewDate;//评论时间
    private Integer isLike; //是否点赞
    private Integer likeNum;//点赞数
    private String replyContent;//回复内容(商家)
    private Integer isReply; //是否回复

    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String productName;
    @TableField(exist = false)
    private String avatarUrl;
    @TableField(exist = false)
    private String merchantName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}